<%@ Page Language="C#" AutoEventWireup="true" CodeFile="LinksEdit.aspx.cs" Inherits="admin_Links_LinksEdit" %>

<%@ Register Src="../../Control/Upfile.ascx" TagName="Upfile" TagPrefix="uc1" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>编辑友情链接</title>
<link rel="stylesheet" href="../skin/style.css" type="text/css" />
<head>
<script type="text/javascript" src="../../js/Common.js"></script>
    <script type="text/javascript">
	    function wenzi()
	    {
	        logo.style.display="none";
	    }
	    function logoshow()
	    {
	         logo.style.display="";
}

    </script>

</head>
<body>
<form id="form1" runat="server">
<div class="itemtitle">
 <h3>操作提示</h3>
</div>
<div class="itemtitle_tect">
 <ul>
 <li>通过用户管理，您可以进行编辑会员资料、用户组、权限、积分、授权会员勋章以及删除会员等操作；</li>
 <li>请先根据条件搜索用户，然后选择相应的操作。</li>
 </ul>
</div>
<div class="clr"></div>
<div class="talbe_border">
<table cellspacing="0" cellpadding="0" border="0" class="talbe_list">
	<tr>
	<th colspan="2" class="header tou">编辑友情链接</th>
	</tr>
	<tr>
		<td width="16%" class="left1">
			链接类型：		</td>
		<td width="84%" class="left2">
		   
			<input id="radLinkType" name="LinkType" checked type="radio" value="1"
				onclick="logoshow()" runat="server" />
			Logo链接 &nbsp; &nbsp;<input id="radLinkType1" name="LinkType" type="radio" value="2"
				onclick="wenzi()" runat="server" />文字链接
		</td>
	</tr>
	<tr>
		<td class="left1">
			网站名称：		</td>
		<td class="left2">
		<asp:TextBox ID="txtWebName" runat="server" Width="200px"></asp:TextBox></td>
	</tr>
	<tr>
		<td class="left1">
			网站地址：		</td>
		<td class="left2">
			<asp:TextBox ID="txtWebURL" runat="server" Width="200px">http://</asp:TextBox>
		</td>
	</tr>
	<tr id="logo" runat="server">
		<td class="left1">
			网站Logo：		</td>
		<td>
		<div style="float:left">
			<asp:HiddenField ID="HiddUserID" runat="server" />
			<asp:HiddenField ID="ImgUrl1" runat="server" Value="20" />
			&nbsp; <a href="" id="txturldz" target="_blank">
				<img border="0" src="../../../Images/System/wutu.gif" id="ImgUrl" alt="" 
					style="width: 106px; height: 95px"  runat="server"  /></a><br />
			<input id="txtupload" type="button" value="上传" onclick="return rowTest()" /><br />
			<div id="rowTest" style="display: none">
				<iframe name="tag" src="../UpFile/Upload.html?Links" style="width: 550px; height: 130px"
					frameborder="0" scrolling="no" onload="this.height=tag.document.body.scrollHeight">
				</iframe>
			</div>
			<div id="Upload">
			</div>
			</div>
		</td>
	</tr>
	<tr>
		<td class="left1">
			网站简介：		</td>
		<td class="left2">
			<asp:TextBox ID="txtWebIntro" runat="server" Width="300px" Height="99px" TextMode="MultiLine"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="left1">
			站长：		</td>
		<td class="left2">
			<asp:TextBox ID="txtWebAdmin" runat="server" Width="200px"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="left1">
			邮箱：		</td>
		<td class="left2">
			<asp:TextBox ID="txtEmail" runat="server" Width="200px"></asp:TextBox>
		</td>
	</tr>
	<tr>
		<td class="left1">
			排序：		</td>
		<td class="left2">
			<asp:TextBox ID="txtSequence" runat="server" Width="200px"></asp:TextBox>
		</td>
	</tr>
	
	<tr>
		<td colspan="2" align="center" bgcolor="#fefbf7">
			<asp:Button ID="btnSave" runat="server" Text="确定" OnClick="btnSave_Click" CssClass="i_button" />&nbsp;
			<asp:Button ID="btnBack" runat="server" Text="取消" OnClick="btnBack_Click" CssClass="i_button" />
		</td>
	</tr>
</table>
  </div>
    </form>

    <script type="text/javascript" src="../../js/Common.js"></script>
 <script type="text/javascript">
    $("btnSave").onclick=function()
   {
     if ($("txtWebName").value.replace(/\s/g,'')=="")
     {
        alert("网站名称不能为空！");
        $("txtWebName").focus();
        return false;
     } 
     if($("txtWebURL").value.replace(/\s/g,'')=="")
     {
        alert("网站地址不能为空!")
        $("txtWebURL").focus();
        return false
     }
    if($("radLinkType1").checked==false)
    { 
    if(FileUPload(1)==1)
     {
      alert("上传图片不能为空！")
      return false;  
     }
    }  
    if($("txtEmail").value.replace(/\s/g,'')=="")
    {
      alert("邮箱不能为空!")
      $("txtEmail").focus();  
      return false
     }
     else if(!ValidateEmail($("txtEmail").value.replace(/\s/g,'')))
     {
      alert("邮箱的格式输入错误!");
      $("txtEmail").focus();  
      return false
     }
     if ($("txtSequence").value.replace(/\s/g,'')!="")
     {
     if (!isNumber($("txtSequence").value.replace(/\s/g,'')))
       {
        alert("只能输入数字!")
        return false
       }
     }
   }
    </script>

</body>
</html>
